Skip to content

Support right inverse for rectangular surjective LinearLayout matrices#10

Merged
leeliu103 merged 1 commit intomainfrom
feat/linear-layout-right-inverse-clean
Dec 4, 2025
Merged

Support right inverse for rectangular surjective LinearLayout matrices#10
leeliu103 merged 1 commit intomainfrom
feat/linear-layout-right-inverse-clean

Conversation

@leeliu103
Copy link
Owner

Enable LinearLayout.invert() to compute right inverses for rectangular layouts where inputBitCount >= outputBitCount and the matrix has full row rank. This allows inversion of surjective layouts that are not bijective, computing a canonical right inverse that zeros the null space.

Key changes:

  • Update invertBinaryMatrix() to use Gaussian elimination for m×n matrices (m <= n)
  • Relax inversion requirements from square matrices to surjective layouts
  • Add test for rank-deficient rectangular matrices to ensure proper rejection
  • Update existing tests to reflect new right inverse behavior

🤖 Generated with Claude Code

Enable LinearLayout.invert() to compute right inverses for rectangular
layouts where inputBitCount >= outputBitCount and the matrix has full
row rank. This allows inversion of surjective layouts that are not
bijective, computing a canonical right inverse that zeros the null space.

Key changes:
- Update invertBinaryMatrix() to use Gaussian elimination for m×n matrices (m <= n)
- Relax inversion requirements from square matrices to surjective layouts
- Add test for rank-deficient rectangular matrices to ensure proper rejection
- Update existing tests to reflect new right inverse behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@leeliu103 leeliu103 merged commit 046ba80 into main Dec 4, 2025
1 check passed
@leeliu103 leeliu103 deleted the feat/linear-layout-right-inverse-clean branch December 4, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant